<?php

namespace App\Services\Admin;

use App\Models\IntegralPlan as IntegralPlanModel;

class IntegralPlan extends Base
{
    public static function lists()
    {
        return (new IntegralPlanModel)->orderBy('id', 'desc')->paginate(15);
    }

    public static function info($id)
    {
        return (new IntegralPlanModel)->where('id', $id)->first();
    }

    public static function add($param = [])
    {
        return (new IntegralPlanModel)->insert($param);
    }

    public static function edit($id , $param=[])
    {
       // dd($param);
        return (new IntegralPlanModel)->where('id',$id)->update($param);
    }

    public static function del($id)
    {
        return (new IntegralPlanModel)->where('id', $id)->delete();
    }
}
